<template>
	<view class="itu-demo">
		<view class="itu-demo-wrap">
			<view class="itu-demo-title">演示效果</view>
			<view class="itu-demo-area">
				<view class="itu-demo-result-line">fabutton是否停靠：{{ isDock }}</view>
			</view>
		</view>
		<view class="itu-item-title itu-mt-20">是否停靠</view>
		<subsection :list="list" v-model="current" @change="handleChange"></subsection>
		<itu-fabutton :isDock="isDock">
			<view class="itu-flex itu-align-center itu-text-xxl itu-mb-5 itu-text-white">+</view>
		</itu-fabutton>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					{
						name: '是'
					},
					{
						name: '否'
					}
				],
				current: 0,
				isDock: true
			}
		},
		onLoad({title}) {
			this.setNavigationBarTitle(title)
		},
		methods:{
			handleChange(val) {
				this.isDock = !val
			}
		}
	}
</script>
